// TestDataLoader.java - 测试数据加载类
package com.library.util;

import com.library.entity.*;
import com.library.service.LibraryDataService;
import java.time.LocalDate;

public class TestDataLoader {
    
    public static void loadTestData(LibraryDataService dataService) {
        // 添加测试图书数据
        dataService.addBook(new Book("9787115546081", "Java核心技术", "凯·S.霍斯特曼", 
            "人民邮电出版社", LocalDate.of(2022, 1, 1), 149.0, 
            "计算机", "A区-计算机类", 5));
        
        dataService.addBook(new Book("9787111636664", "深入理解计算机系统", "Randal E.Bryant", 
            "机械工业出版社", LocalDate.of(2019, 7, 1), 139.0, 
            "计算机", "A区-计算机类", 3));
            
        dataService.addBook(new Book("9787302514342", "Python编程从入门到实践", "Eric Matthes", 
            "清华大学出版社", LocalDate.of(2020, 5, 1), 89.0, 
            "计算机", "A区-计算机类", 8));
        
        dataService.addBook(new Book("9787020161319", "百年孤独", "加西亚·马尔克斯", 
            "人民文学出版社", LocalDate.of(2017, 8, 1), 39.5, 
            "文学", "B区-文学类", 4));
    }
}